package com.songyang.yougnsql.config;

import com.songyang.yougnsql.server.serialize.inter.YoungSqlSerialize;

import java.util.HashMap;

/**
 * @ClassName ConfigConst
 * @Description 配置文件中配置常量类
 * @date 2022/12/27 18:03
 * @Author yanceysong
 * @Version 1.0
 */
public class ConfigConst {

    public static final HashMap<String, Object> CONFIG_DEFAULT_MAP = new HashMap<>();
    public static final String SQL_CACHE_LIMIT = "sqlCacheLimitCount";
    public static final String CORE_DATA_CACHE_LIMIT = "coreDataCacheLimitCount";
    public static final String ENCODER_TYPE = "encoderType";
    public static final String DB_DATA_PATH = "dbDataPath";
    public static final String MEMORY = "memory";
    public static final String PRINT_LOG = "printLog";

    static {
        CONFIG_DEFAULT_MAP.put(ConfigConst.SQL_CACHE_LIMIT, 500);
        CONFIG_DEFAULT_MAP.put(ConfigConst.ENCODER_TYPE, YoungSqlSerialize.YOUNG_SERIALIZE);
        CONFIG_DEFAULT_MAP.put(ConfigConst.CORE_DATA_CACHE_LIMIT, 500);
        CONFIG_DEFAULT_MAP.put(ConfigConst.DB_DATA_PATH, ".");
        CONFIG_DEFAULT_MAP.put(ConfigConst.MEMORY, "128MB");
        CONFIG_DEFAULT_MAP.put(ConfigConst.PRINT_LOG, true);
    }
}
